package com.xnew.provider;

import com.xnew.api.SysNoticeApi;
import com.xnew.model.params.SysNoticeParam;
import com.xnew.model.result.SysNoticeResult;
import com.xnew.service.SysNoticeService;
import com.xnewtech.xplatform.swan.model.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 通知表服务提供者
 *
 * @author shj
 * @Date 2021-08-09 15:49:46
 */
@RestController
public class SysNoticeProvider implements SysNoticeApi {


    @Autowired
    private SysNoticeService sysNoticeService;

    /**
     * 新增
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public void add(@RequestBody SysNoticeParam param) {
        sysNoticeService.add(param);
    }

    /**
     * 修改
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public void delete(@RequestBody SysNoticeParam param) {
        sysNoticeService.delete(param);
    }

    /**
     * 删除
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public void update(@RequestBody SysNoticeParam param) {
        sysNoticeService.update(param);
    }

    /**
     * 查询单条详情
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public SysNoticeResult findBySpec(@RequestBody SysNoticeParam param) {
        return sysNoticeService.findBySpec(param);
    }

    /**
     * 查询列表
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public List<SysNoticeResult> findListBySpec(@RequestBody SysNoticeParam param) {
        return sysNoticeService.findListBySpec(param);
    }

    /**
     * 分页查询列表
     *
     * @author shj
     * @Date 2021-08-09
     */
    @Override
    public PageResult<SysNoticeResult> findPageBySpec(@RequestBody SysNoticeParam param) {
        return sysNoticeService.findPageBySpec(param);
    }

}
